package order

import (
	//"bee/models"
	//"github.com/go-resty/resty/v2"
	//"github.com/tidwall/gjson"
	//"strings"
)

type CC struct {
	FullName             string `json:"fullName"`
	LocationCode         string `json:"locationCode"`
	BizLocationCode      string `json:"bizLocationCode"`
	Nsrsbh               string `json:"nsrsbh"`
	Shxydm               string `json:"shxydm"`
	InternalUsableStatus string `json:"internalUsableStatus"`
	Source               string `json:"source"`
}

func SetCustomer(appNamespace, fullName string) (customerId string, err error) {
	return "", nil

	//appName := "cc"
	//uri := "/cc-production/test/company/saveOrUpdateAgency"
	//
	//appId, appErr:= models.GetAppIdByName(appName)
	//if appErr != nil {
	//	return "", appErr
	//}
	//
	//appEnv, envErr:= models.GetAppEnvInfo(appId, appNamespace)
	//if envErr != nil {
	//	return "", envErr
	//}
	//
	//if !strings.HasPrefix(appEnv.AppDomain, "http://") {
	//	appEnv.AppDomain = "http://" + appEnv.AppDomain
	//}
	//
	//c := CC{
	//	FullName:             fullName,
	//	LocationCode:         "130982",
	//	BizLocationCode:      "130000",
	//	Nsrsbh:               "",
	//	Shxydm:               "",
	//	InternalUsableStatus: "Y",
	//	Source:               "214649602167",
	//}
	//
	//client := resty.New()
	//
	//headers := make(map[string]string)
	//headers["Content-Type"] = "application/json"
	//headers["appId"] = "20010100010000"
	//headers["timestamp"] = "1467791956367"
	//headers["appKey"] = "48778FFD44ADE08A462BF1EF3085BBD2D02613EF"
	//
	//customerResp, ccErr := client.R().SetHeaders(headers).
	//	SetBody(c).Post(appEnv.AppDomain + uri)
	//
	//if ccErr != nil {
	//	return "", ccErr
	//}
	//
	////time.Sleep(1 * time.Second)
	//
	//return gjson.Get(customerResp.String(), "data").String(), nil

}